package org.yuchen.tag;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;

public class MySubBodyTag extends BodyTagSupport{
	private String id;
	
	@Override
	public int doEndTag() throws JspException {
		return EVAL_PAGE;
	}

	@Override
	public int doStartTag() throws JspException {
		String cid = (String) pageContext.findAttribute("id");
		try {
			pageContext.getOut().println("input id is : " + cid);
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		//��ִ�б�ǩ��
		return SKIP_BODY;
	}

	public void setId(String id) {
		this.id = id;
	}
	
}
